<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsem: xsem_cram_example_pl_mb.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsem
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xsem__cram__example__pl__mb_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xsem_cram_example_pl_mb.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file demonstrates on how to use XilSEM CRAM client interface on PL Microblaze to send commands to PLM firmware and read responses from PLM. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who       Date        Changes
</p>
<hr/>
<p>
0.1   gupta   11/16/2022  Initial Creation
0.2   anv     10/18/2023  Added macro protection to Enable Error Injection
                          Feature usage and Updated to get
                          XilSEM CRAM status prints and
                          Added Test print summary
0.3   gam     01/02/2023  Fixed IPI interrupt ID for PL MB Versal Net,
                          changed Uncorrectable and CRC error data.
                          Moved Error injection sequence in the end of
                          main function to get clear prints.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aaea6614590c6c6eedade935ae1c1a26c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsem__cram__example__pl__mb_8c.html#aaea6614590c6c6eedade935ae1c1a26c">SetUpInterruptSystem</a> (XIntc *XIntcInstancePtr)</td></tr>
<tr class="memdesc:aaea6614590c6c6eedade935ae1c1a26c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function connects the IPI interrupts to the interrupt controller and to the processor.  <a href="#aaea6614590c6c6eedade935ae1c1a26c">More...</a><br/></td></tr>
<tr class="separator:aaea6614590c6c6eedade935ae1c1a26c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8ada016a202fb27c62bb5cc5aece9b8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsem__cram__example__pl__mb_8c.html#aa8ada016a202fb27c62bb5cc5aece9b8">IntcAndIpiInit</a> (void)</td></tr>
<tr class="memdesc:aa8ada016a202fb27c62bb5cc5aece9b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes Interrupt Controller and IPI drivers.  <a href="#aa8ada016a202fb27c62bb5cc5aece9b8">More...</a><br/></td></tr>
<tr class="separator:aa8ada016a202fb27c62bb5cc5aece9b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsem__cram__example__pl__mb_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aa8ada016a202fb27c62bb5cc5aece9b8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int IntcAndIpiInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initializes Interrupt Controller and IPI drivers. </p>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS to indicate success, otherwise XST_FAILURE. </dd></dl>
<p>Initialize the interrupt controller driver so that it is ready to use.</p>
<p>Perform a self-test to ensure that the hardware was built correctly.</p>

<p>References <a class="el" href="xsem__cram__example__pl__mb_8c.html#aaea6614590c6c6eedade935ae1c1a26c">SetUpInterruptSystem()</a>.</p>

<p>Referenced by <a class="el" href="xsem__cram__example__pl__mb_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize IPI Driver This initialization is required to get XilSEM event notifications from PLM</p>
<p>Initialize CRAM scan if not initialized This is applicable when CRAM Scan is set for deferred start up.</p>
<p>Enable event Notifications to receive notifications from PLM upon detection of any error in CFRAME</p>

<p>References <a class="el" href="xsem__client__api_8h.html#ae797b34b39e98d4c76a257e4002021e9">CFRAME_MAX_TYPE</a>, <a class="el" href="xsem__client__api_8h.html#a6f193ed2aa5a20321a440ce254e17bd0">CMD_ACK_SEM_GET_CONFIG</a>, <a class="el" href="xsem__client__api_8h.html#a1e8bfe22257d21ff49128562bdef56a5">CMD_ACK_SEM_READ_FRAME_ECC</a>, <a class="el" href="struct_x_sem_cfr_status.html#ab833bd42039240f18e2637d47b8e2956">XSemCfrStatus::ErrAddrH</a>, <a class="el" href="struct_x_sem_cfr_status.html#ade29b60e7b0785d909c7065bd54ad9c9">XSemCfrStatus::ErrAddrL</a>, <a class="el" href="struct_x_sem_cfr_status.html#a4761efb652d2500853d8cb20c54f6578">XSemCfrStatus::ErrCorCnt</a>, <a class="el" href="xsem__cram__example__pl__mb_8c.html#aa8ada016a202fb27c62bb5cc5aece9b8">IntcAndIpiInit()</a>, <a class="el" href="xsem__client__api_8h.html#a4a89a50aecbaec25f7bf43f69ca7ad12">MAX_CRAMERR_REGISTER_CNT</a>, <a class="el" href="struct_x_sem_ipi_resp.html#a7d7eea2dd43f003a0602eeebaf3ac85d">XSemIpiResp::RespMsg1</a>, <a class="el" href="struct_x_sem_ipi_resp.html#a1502bcdecb5e80f54fd9f283dfeb8a2c">XSemIpiResp::RespMsg2</a>, <a class="el" href="struct_x_sem_ipi_resp.html#a279939a3e855020b8e0648fb7d95a1e5">XSemIpiResp::RespMsg3</a>, <a class="el" href="struct_x_sem_ipi_resp.html#a6c53aa10485996d8a9a3ad24a667e058">XSemIpiResp::RespMsg4</a>, <a class="el" href="struct_x_sem_cfr_status.html#addd887c9fd58e8458504557f871e9db3">XSemCfrStatus::Status</a>, <a class="el" href="group__xsem__client__apis.html#ga328b7ac78458167adf6d0379b01c7540">XSem_CmdCfrGetCrc()</a>, <a class="el" href="group__xsem__client__apis.html#ga649664a7f7ef4c94cd2d64eaa9a3f6ad">XSem_CmdCfrGetStatus()</a>, <a class="el" href="group__xsem__client__apis.html#ga6aad75df1ff864f2897a8416c0914157">XSem_CmdCfrGetTotalFrames()</a>, <a class="el" href="group__xsem__client__apis.html#ga3b46228cefc81560e659ca60f5f5d4ac">XSem_CmdCfrReadFrameEcc()</a>, and <a class="el" href="group__xsem__client__apis.html#ga4ba3494dc86f68d1843feb2ad69fbbe3">XSem_CmdGetConfig()</a>.</p>

</div>
</div>
<a class="anchor" id="aaea6614590c6c6eedade935ae1c1a26c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SetUpInterruptSystem </td>
          <td>(</td>
          <td class="paramtype">XIntc *&#160;</td>
          <td class="paramname"><em>XIntcInstancePtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function connects the IPI interrupts to the interrupt controller and to the processor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Intc</td><td>instance pointer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None. </dd></dl>
<p>Connect IPI interrupt handler that will be called when an interrupt for the IPI occurs, the IPI interrupt handler performs the specific interrupt processing for IPI.</p>
<p>Start the interrupt controller such that interrupts are enabled for all devices that cause interrupts.</p>

<p>References <a class="el" href="xsem__npi__example__pl__mb_8c.html#a6d99b9735fb6389f87f724da74dc1609">INTC_DEVICE_IPI_INT_ID</a>.</p>

<p>Referenced by <a class="el" href="xsem__cram__example__pl__mb_8c.html#aa8ada016a202fb27c62bb5cc5aece9b8">IntcAndIpiInit()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
